home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / accessibility / nsIAccessible.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  42KB  |  1,057 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIAccessible.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIAccessible_h__
  6. #define __gen_nsIAccessible_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17.  
  18. /* starting interface:    nsIAccessible */
  19. #define NS_IACCESSIBLE_IID_STR "db717db4-37e9-42f1-a3b0-2579dd7c3814"
  20.  
  21. #define NS_IACCESSIBLE_IID \
  22.   {0xdb717db4, 0x37e9, 0x42f1, \
  23.     { 0xa3, 0xb0, 0x25, 0x79, 0xdd, 0x7c, 0x38, 0x14 }}
  24.  
  25. /**
  26.  * A cross-platform interface that supports platform-specific 
  27.  * accessibility APIs like MSAA and ATK. Contains the sum of what's needed
  28.  * to support IAccessible as well as ATK's generic accessibility objects.
  29.  * Can also be used by in-process accessibility clients to get information
  30.  * about objects in the accessible tree. The accessible tree is a subset of 
  31.  * nodes in the DOM tree -- such as documents, focusable elements and text.
  32.  * Mozilla creates the implementations of nsIAccessible on demand.
  33.  * See http://www.mozilla.org/projects/ui/accessibility for more information.
  34.  *
  35.  * @status UNDER_REVIEW
  36.  */
  37. class nsIAccessible : public nsISupports {
  38.  public: 
  39.  
  40.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IACCESSIBLE_IID)
  41.  
  42.   /**
  43.    * Parent node in accessible tree.
  44.    */
  45.   /* readonly attribute nsIAccessible parent; */
  46.   NS_IMETHOD GetParent(nsIAccessible * *aParent) = 0;
  47.  
  48.   /**
  49.    * Next sibling in accessible tree
  50.    */
  51.   /* readonly attribute nsIAccessible nextSibling; */
  52.   NS_IMETHOD GetNextSibling(nsIAccessible * *aNextSibling) = 0;
  53.  
  54.   /**
  55.    * Previous sibling in accessible tree
  56.    */
  57.   /* readonly attribute nsIAccessible previousSibling; */
  58.   NS_IMETHOD GetPreviousSibling(nsIAccessible * *aPreviousSibling) = 0;
  59.  
  60.   /**
  61.    * First child in accessible tree
  62.    */
  63.   /* readonly attribute nsIAccessible firstChild; */
  64.   NS_IMETHOD GetFirstChild(nsIAccessible * *aFirstChild) = 0;
  65.  
  66.   /**
  67.    * Last child in accessible tree
  68.    */
  69.   /* readonly attribute nsIAccessible lastChild; */
  70.   NS_IMETHOD GetLastChild(nsIAccessible * *aLastChild) = 0;
  71.  
  72.   /**
  73.    * Number of accessible children
  74.    */
  75.   /* readonly attribute long childCount; */
  76.   NS_IMETHOD GetChildCount(PRInt32 *aChildCount) = 0;
  77.  
  78.   /**
  79.    * The 0-based index of this accessible in its parent's list of children,
  80.    * or -1 if this accessible does not have a parent.
  81.    */
  82.   /* readonly attribute long indexInParent; */
  83.   NS_IMETHOD GetIndexInParent(PRInt32 *aIndexInParent) = 0;
  84.  
  85.   /**
  86.    * Accessible name -- the main text equivalent for this node
  87.    */
  88.   /* attribute AString name; */
  89.   NS_IMETHOD GetName(nsAString & aName) = 0;
  90.   NS_IMETHOD SetName(const nsAString & aName) = 0;
  91.  
  92.   /**
  93.    * Accessible value -- a number or a secondary text equivalent for this node
  94.    * Widgets that use xhtml2:role can force a value using the valuenow attribute
  95.    */
  96.   /* readonly attribute AString finalValue; */
  97.   NS_IMETHOD GetFinalValue(nsAString & aFinalValue) = 0;
  98.  
  99.   /**
  100.    * Accessible description -- long text associated with this node
  101.    */
  102.   /* readonly attribute AString description; */
  103.   NS_IMETHOD GetDescription(nsAString & aDescription) = 0;
  104.  
  105.   /**
  106.    * Provides localized string of accesskey name, such as Alt+D.
  107.    * The modifier may be affected by user and platform preferences.
  108.    * Usually alt+letter, or just the letter alone for menu items. 
  109.    */
  110.   /* readonly attribute AString keyboardShortcut; */
  111.   NS_IMETHOD GetKeyboardShortcut(nsAString & aKeyboardShortcut) = 0;
  112.  
  113.   /**
  114.    * Provides localized string of global keyboard accelerator, such
  115.    * as Ctrl+O for Open file
  116.    */
  117.   /* readonly attribute AString keyBinding; */
  118.   NS_IMETHOD GetKeyBinding(nsAString & aKeyBinding) = 0;
  119.  
  120.   /**
  121.    * Natural enumerated accessible role for the associated element.
  122.    * The values depend on platform because of variations.
  123.    * See the ROLE_* constants defined later in this file.
  124.    * This does not take into account xhtml2:role as the finalRole does.
  125.    */
  126.   /* readonly attribute unsigned long role; */
  127.   NS_IMETHOD GetRole(PRUint32 *aRole) = 0;
  128.  
  129.   /**
  130.    * Enumerated accessible role. The values depend on platform because of variations.
  131.    * See the ROLE_* constants defined later in this file.
  132.    * Widgets can use xhtml2:role to force the final role
  133.    */
  134.   /* readonly attribute unsigned long finalRole; */
  135.   NS_IMETHOD GetFinalRole(PRUint32 *aFinalRole) = 0;
  136.  
  137.   /**
  138.    * Accessible states -- bit field which describes boolean properties of node. 
  139.    * See the STATE_* constants defined later in this file.
  140.    * Widgets that use xhtml2:role can force the state using the attributes
  141.    * disabled, etc.
  142.    */
  143.   /* readonly attribute unsigned long finalState; */
  144.   NS_IMETHOD GetFinalState(PRUint32 *aFinalState) = 0;
  145.  
  146.   /**
  147.    * Extended accessible states -- second bit field describing node
  148.    */
  149.   /* readonly attribute unsigned long extState; */
  150.   NS_IMETHOD GetExtState(PRUint32 *aExtState) = 0;
  151.  
  152.   /**
  153.    * Help text associated with node
  154.    */
  155.   /* readonly attribute AString help; */
  156.   NS_IMETHOD GetHelp(nsAString & aHelp) = 0;
  157.  
  158.   /**
  159.    * Focused accessible child of node
  160.    */
  161.   /* readonly attribute nsIAccessible focusedChild; */
  162.   NS_IMETHOD GetFocusedChild(nsIAccessible * *aFocusedChild) = 0;
  163.  
  164.   /**
  165.    * Accessible child which contains the coordinate at x,y
  166.    */
  167.   /* nsIAccessible getChildAtPoint (in long x, in long y); */
  168.   NS_IMETHOD GetChildAtPoint(PRInt32 x, PRInt32 y, nsIAccessible **_retval) = 0;
  169.  
  170.   /**
  171.    * Nth accessible child using zero-based index or last child if index less than zero
  172.    */
  173.   /* nsIAccessible getChildAt (in long aChildIndex); */
  174.   NS_IMETHOD GetChildAt(PRInt32 aChildIndex, nsIAccessible **_retval) = 0;
  175.  
  176.   /**
  177.    * Accessible node geometrically to the right of this one
  178.    */
  179.   /* nsIAccessible getAccessibleToRight (); */
  180.   NS_IMETHOD GetAccessibleToRight(nsIAccessible **_retval) = 0;
  181.  
  182.   /**
  183.    * Accessible node geometrically to the left of this one
  184.    */
  185.   /* nsIAccessible getAccessibleToLeft (); */
  186.   NS_IMETHOD GetAccessibleToLeft(nsIAccessible **_retval) = 0;
  187.  
  188.   /**
  189.    * Accessible node geometrically above this one
  190.    */
  191.   /* nsIAccessible getAccessibleAbove (); */
  192.   NS_IMETHOD GetAccessibleAbove(nsIAccessible **_retval) = 0;
  193.  
  194.   /**
  195.    * Accessible node geometrically below this one
  196.    */
  197.   /* nsIAccessible getAccessibleBelow (); */
  198.   NS_IMETHOD GetAccessibleBelow(nsIAccessible **_retval) = 0;
  199.  
  200.   /**
  201.    * Accessible node related to this one 
  202.    */
  203.   /* nsIAccessible getAccessibleRelated (in unsigned long aRelationType); */
  204.   NS_IMETHOD GetAccessibleRelated(PRUint32 aRelationType, nsIAccessible **_retval) = 0;
  205.  
  206.   /* void getBounds (out long x, out long y, out long width, out long height); */
  207.   NS_IMETHOD GetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height) = 0;
  208.  
  209.   /**
  210.    * Add this accessible to the current selection
  211.    */
  212.   /* void addSelection (); */
  213.   NS_IMETHOD AddSelection(void) = 0;
  214.  
  215.   /**
  216.    * Remove this accessible from the current selection
  217.    */
  218.   /* void removeSelection (); */
  219.   NS_IMETHOD RemoveSelection(void) = 0;
  220.  
  221.   /**
  222.    * Extend the current selection from its current accessible anchor node
  223.    * to this accessible
  224.    */
  225.   /* void extendSelection (); */
  226.   NS_IMETHOD ExtendSelection(void) = 0;
  227.  
  228.   /**
  229.    * Select this accessible node only
  230.    */
  231.   /* void takeSelection (); */
  232.   NS_IMETHOD TakeSelection(void) = 0;
  233.  
  234.   /**
  235.    * Focus this accessible node,
  236.    * The state STATE_FOCUSABLE indicates whether this node is normally focusable.
  237.    * It is the callers responsibility to determine whether this node is focusable.
  238.    * accTakeFocus on a node that is not normally focusable (such as a table),
  239.    * will still set focus on that node, although normally that will not be visually 
  240.    * indicated in most style sheets.
  241.    */
  242.   /* void takeFocus (); */
  243.   NS_IMETHOD TakeFocus(void) = 0;
  244.  
  245.   /**
  246.    * The number of accessible actions associated with this accessible
  247.    */
  248.   /* readonly attribute PRUint8 numActions; */
  249.   NS_IMETHOD GetNumActions(PRUint8 *aNumActions) = 0;
  250.  
  251.   /**
  252.    * The name of the accessible action at the given zero-based index
  253.    */
  254.   /* AString getActionName (in PRUint8 index); */
  255.   NS_IMETHOD GetActionName(PRUint8 index, nsAString & _retval) = 0;
  256.  
  257.   /**
  258.    * Perform the accessible action at the given zero-based index
  259.    * Action number 0 is the default action
  260.    */
  261.   /* void doAction (in PRUint8 index); */
  262.   NS_IMETHOD DoAction(PRUint8 index) = 0;
  263.  
  264.   /**
  265.    * Get a pointer to accessibility interface for this node, which is specific 
  266.    * to the OS/accessibility toolkit we're running on.
  267.    */
  268.   /* [noscript] void getNativeInterface (out voidPtr aOutAccessible); */
  269.   NS_IMETHOD GetNativeInterface(void * *aOutAccessible) = 0;
  270.  
  271.   /**
  272.    * MSAA State flags - used for bitfield. More than 1 allowed.
  273.    */
  274.   enum { STATE_UNAVAILABLE = 1U };
  275.  
  276.   enum { STATE_SELECTED = 2U };
  277.  
  278.   enum { STATE_FOCUSED = 4U };
  279.  
  280.   enum { STATE_PRESSED = 8U };
  281.  
  282.   enum { STATE_CHECKED = 16U };
  283.  
  284.   enum { STATE_MIXED = 32U };
  285.  
  286.   enum { STATE_READONLY = 64U };
  287.  
  288.   enum { STATE_HOTTRACKED = 128U };
  289.  
  290.   enum { STATE_DEFAULT = 256U };
  291.  
  292.   enum { STATE_EXPANDED = 512U };
  293.  
  294.   enum { STATE_COLLAPSED = 1024U };
  295.  
  296.   enum { STATE_BUSY = 2048U };
  297.  
  298.   enum { STATE_FLOATING = 4096U };
  299.  
  300.   enum { STATE_MARQUEED = 8192U };
  301.  
  302.   enum { STATE_ANIMATED = 16384U };
  303.  
  304.   enum { STATE_INVISIBLE = 32768U };
  305.  
  306.   enum { STATE_OFFSCREEN = 65536U };
  307.  
  308.   enum { STATE_SIZEABLE = 131072U };
  309.  
  310.   enum { STATE_MOVEABLE = 262144U };
  311.  
  312.   enum { STATE_SELFVOICING = 524288U };
  313.  
  314.   enum { STATE_FOCUSABLE = 1048576U };
  315.  
  316.   enum { STATE_SELECTABLE = 2097152U };
  317.  
  318.   enum { STATE_LINKED = 4194304U };
  319.  
  320.   enum { STATE_TRAVERSED = 8388608U };
  321.  
  322.   enum { STATE_MULTISELECTABLE = 16777216U };
  323.  
  324.   enum { STATE_EXTSELECTABLE = 33554432U };
  325.  
  326.   enum { STATE_ALERT_LOW = 67108864U };
  327.  
  328.   enum { STATE_ALERT_MEDIUM = 134217728U };
  329.  
  330.   enum { STATE_ALERT_HIGH = 268435456U };
  331.  
  332.   enum { STATE_PROTECTED = 536870912U };
  333.  
  334.   enum { STATE_HASPOPUP = 1073741824U };
  335.  
  336.   enum { STATE_REQUIRED = 67108864U };
  337.  
  338.   enum { STATE_IMPORTANT = 134217728U };
  339.  
  340.   enum { STATE_INVALID = 268435456U };
  341.  
  342.   enum { STATE_CHECKABLE = 8192U };
  343.  
  344.   /**
  345.  * Extended state flags (for now non-MSAA, for Java and Gnome/ATK support)
  346.  * "Extended state flags" has seperate value space from "MSAA State flags".
  347.  */
  348.   enum { EXT_STATE_EDITABLE = 2097152U };
  349.  
  350.   enum { EXT_STATE_ACTIVE = 4194304U };
  351.  
  352.   enum { EXT_STATE_EXPANDABLE = 8388608U };
  353.  
  354.   enum { EXT_STATE_MODAL = 16777216U };
  355.  
  356.   enum { EXT_STATE_MULTI_LINE = 33554432U };
  357.  
  358.   enum { EXT_STATE_SENSITIVE = 67108864U };
  359.  
  360.   enum { EXT_STATE_SHOWING = 268435456U };
  361.  
  362.   enum { EXT_STATE_SINGLE_LINE = 536870912U };
  363.  
  364.   enum { EXT_STATE_TRANSIENT = 1073741824U };
  365.  
  366.   enum { EXT_STATE_VERTICAL = 2147483648U };
  367.  
  368.   /**
  369.  * Relation Types -- most of these come from ATK's atkrelationtype.h
  370.  * RELATION_NULL:
  371.  * RELATION_CONTROLLED_BY:    Controlled by one or more target objects.
  372.  * RELATION_CONTROLLER_FOR:   Controller for one or more target objects.
  373.  * RELATION_LABEL_FOR:        Label for one or more target objects.
  374.  * RELATION_LABELLED_BY:      Labelled by one or more target objects.
  375.  * RELATION_MEMBER_OF:        Member of a group of one or more target objects.
  376.  * RELATION_NODE_CHILD_OF:    Cell in a treetable which is displayed because a
  377.  *                            cell in the same col is expanded & identifies it.
  378.  * RELATION_FLOWS_TO:         Has content that flows logically to another
  379.  *                            object in a sequential way, e.g. text flow.
  380.  * RELATION_FLOWS_FROM:       Has content that flows logically from another
  381.  *                            object in a sequential way, e.g. text flow.
  382.  * RELATION_SUBWINDOW_OF:     Subwindow attached to a component but otherwise 
  383.  *                            not connected in the UI hierarchy to that component.
  384.  * RELATION_EMBEDS:           Visually embeds another object's content, i.e.
  385.  *                            this object's content flows around another's content.
  386.  * RELATION_EMBEDDED_BY:      Inverse of RELATION_EMBEDS; this object's content
  387.  *                            is visually embedded in another object.
  388.  * RELATION_POPUP_FOR:        Popup for another object.
  389.  * RELATION_PARENT_WINDOW_OF: Parent window of another object.
  390.  * RELATION_DEFAULT_BUTTON:   Part of a form/dialog with a related default button.
  391.  * RELATION_DESCRIBED_BY:     Described by one or more target objects.
  392.  * RELATION_DESCRIPTION_FOR:  Description for one or more target objects.
  393.  * RELATION_LAST_DEFINED:
  394.  */
  395.   enum { RELATION_NUL = 0U };
  396.  
  397.   enum { RELATION_CONTROLLED_BY = 1U };
  398.  
  399.   enum { RELATION_CONTROLLER_FOR = 2U };
  400.  
  401.   enum { RELATION_LABEL_FOR = 3U };
  402.  
  403.   enum { RELATION_LABELLED_BY = 4U };
  404.  
  405.   enum { RELATION_MEMBER_OF = 5U };
  406.  
  407.   enum { RELATION_NODE_CHILD_OF = 6U };
  408.  
  409.   enum { RELATION_FLOWS_TO = 7U };
  410.  
  411.   enum { RELATION_FLOWS_FROM = 8U };
  412.  
  413.   enum { RELATION_SUBWINDOW_OF = 9U };
  414.  
  415.   enum { RELATION_EMBEDS = 10U };
  416.  
  417.   enum { RELATION_EMBEDDED_BY = 11U };
  418.  
  419.   enum { RELATION_POPUP_FOR = 12U };
  420.  
  421.   enum { RELATION_PARENT_WINDOW_OF = 13U };
  422.  
  423.   enum { RELATION_DEFAULT_BUTTON = 16384U };
  424.  
  425.   enum { RELATION_DESCRIBED_BY = 16385U };
  426.  
  427.   enum { RELATION_DESCRIPTION_FOR = 16386U };
  428.  
  429. #ifdef MOZ_ACCESSIBILITY_ATK
  430.   enum { RELATION_LAST_DEFINED = 14U };
  431. /**
  432.  * The following nsIAccessible roles are translated to ATK_ROLE_UNKNOWN
  433.  * 
  434.  *  ROLE_TITLEBAR, ROLE_SOUND, ROLE_CURSOR, ROLE_CARET, ROLE_BORDER,
  435.  *  ROLE_GROUPING, ROLE_EQUATION, ROLE_COLUMN, ROLE_ROW, ROLE_LINK,
  436.  *  ROLE_WHITESPACE, ROLE_CLOCK, ROLE_IPADDRESS, ROLE_NOTHING
  437.  *
  438.  *  ROLE_GRIP
  439.  *    The object represents a special mouse pointer, which allows a user to
  440.  *    manipulate user interface elements such as windows.
  441.  *
  442.  *  ROLE_HELPBALLOON
  443.  *    The object displays a Help topic in the form of a ToolTip or Help balloon.
  444.  *
  445.  *  ROLE_PROPERTYPAGE
  446.  *    The object represents a property sheet.
  447.  *
  448.  *  ROLE_INDICATOR
  449.  *    The object represents an indicator, such as a pointer graphic pointing to
  450.  *    the current item.
  451.  *
  452.  *  ROLE_HOTKEYFIELD
  453.  *    The object represents a hot-key field that allow the user to enter a
  454.  *    sequence of keystroke.
  455.  *
  456.  * The following ATK roles have no corresponding nsIAccessible roles. Perhaps
  457.  * there are not these types of widget/control in Mozilla, so don't need these
  458.  * ATK roles? Or need add some of them?
  459.  *
  460.  *   ATK_ROLE_ARROW
  461.  *     An arrow in one of the four cardinal directions.
  462.  *
  463.  *   ATK_ROLE_INTERNAL_FRAME
  464.  *     A frame-like object that is clipped by a desktop pane.
  465.  * 
  466.  *  ATK_ROLE_ACCEL_LABEL, ATK_ROLE_CANVAS, ATK_ROLE_CHECK_MENU_ITEM,
  467.  *   ATK_ROLE_COLOR_CHOOSER, ATK_ROLE_DATE_EDITOR, ATK_ROLE_DESKTOP_ICON,
  468.  *   ATK_ROLE_DESKTOP_FRAME, ATK_ROLE_DIRECTORY_PANE, ATK_ROLE_FILE_CHOOSER,
  469.  *   ATK_ROLE_FILLER, ATK_ROLE_FONT_CHOOSER, ATK_ROLE_GLASS_PANE,
  470.  *  ATK_ROLE_HTML_CONTAINER, ATK_ROLE_ICON, ATK_ROLE_LAYERED_PANE,
  471.  *   ATK_ROLE_POPUP_MENU, ATK_ROLE_OPTION_PANE, ATK_ROLE_PASSWORD_TEXT,
  472.  *  ATK_ROLE_RADIO_MENU_ITEM, ATK_ROLE_ROOT_PANE, ATK_ROLE_SCROLL_PANE,
  473.  *  ATK_ROLE_SPLIT_PANE, ATK_ROLE_TEAR_OFF_MENU_ITEM, ATK_ROLE_TERMINAL,
  474.  *  ATK_ROLE_TOGGLE_BUTTON, ATK_ROLE_TREE_TABLE, ATK_ROLE_VIEWPORT, ATK_ROLE_LABEL
  475.  *
  476.  * Important:
  477.  * Following value should keep synchronization with the definitions in atk.h
  478.  */
  479.   enum { ROLE_TITLEBAR = 66U };    // ATK_ROLE_UNKNOWN
  480.   enum { ROLE_MENUBAR = 33U };     // ATK_ROLE_MENU_BAR
  481.   enum { ROLE_SCROLLBAR = 47U };   // ATK_ROLE_SCROLL_BAR
  482.   enum { ROLE_GRIP = 66U };        // ATK_ROLE_UNKNOWN
  483.   enum { ROLE_SOUND = 66U };       // ATK_ROLE_UNKNOWN
  484.   enum { ROLE_CURSOR = 66U };      // ATK_ROLE_UNKNOWN
  485.   enum { ROLE_CARET = 66U };       // ATK_ROLE_UNKNOWN
  486.   enum { ROLE_ALERT = 2U };        // ATK_ROLE_ALERT
  487.   enum { ROLE_WINDOW = 68U };      // ATK_ROLE_WINDOW
  488.   // An object used for drawing custom user interface elements
  489.   enum { ROLE_CLIENT = 18U };      // ATK_ROLE_DRAWING_AREA
  490.   enum { ROLE_MENUPOPUP = 32U };   // ATK_ROLE_MENU
  491.   enum { ROLE_MENUITEM = 34U };    // ATK_ROLE_MENU_ITEM
  492.   enum { ROLE_TOOLTIP = 63U };     // ATK_ROLE_TOOL_TIP
  493.   // The object represents a main window for a application
  494.   enum { ROLE_APPLICATION = 73U }; // ATK_ROLE_APPLICATION
  495.   // The object represents a document window, only for MDI windows
  496.   enum { ROLE_DOCUMENT = 68U };    // ATK_ROLE_WINDOW
  497.   enum { ROLE_PANE = 38U };        // ATK_ROLE_PANEL
  498.   enum { ROLE_CHART = 26U };       // ATK_ROLE_IMAGE
  499.   enum { ROLE_DIALOG = 16U };      // ATK_ROLE_DIALOG
  500.   enum { ROLE_BORDER = 66U };      // ATK_ROLE_UNKNOWN
  501.   enum { ROLE_GROUPING = 38U };    // ATK_ROLE_PANEL
  502.   enum { ROLE_SEPARATOR = 49U };   // ATK_ROLE_SEPARATOR
  503.   enum { ROLE_TOOLBAR = 62U };     // ATK_ROLE_TOOL_BAR
  504.   enum { ROLE_STATUSBAR = 53U };   // ATK_ROLE_STATUSBAR
  505.   enum { ROLE_TABLE = 54U };       // ATK_ROLE_TABLE
  506.   // Or ATK_ROLE_TABLE_COLUMN_HEADER?
  507.   enum { ROLE_COLUMNHEADER = 10U };// ATK_ROLE_COLUMN_HEADER
  508.   // Or ATK_ROLE_TABLE_ROW_HEADER ?
  509.   enum { ROLE_ROWHEADER = 46U };   // ATK_ROLE_ROW_HEADER
  510.   enum { ROLE_COLUMN = 66U };      // ATK_ROLE_UNKNOWN
  511.   enum { ROLE_ROW = 66U };         // ATK_ROLE_UNKNOWN
  512.   enum { ROLE_CELL = 55U };        // ATK_ROLE_TABLE_CELL
  513.   enum { ROLE_LINK = 101U };        // ATK doesn't have such role now
  514.   enum { ROLE_HELPBALLOON = 66U }; // ATK_ROLE_UNKNOWN
  515.   // The object represents a cartoon-like graphic object
  516.   enum { ROLE_CHARACTER = 26U };   // ATK_ROLE_IMAGE
  517.   enum { ROLE_LIST = 30U };        // ATK_ROLE_LIST
  518.   enum { ROLE_LISTITEM = 31U };    // ATK_ROLE_LIST_ITEM
  519.   // The object represents an outline or tree structure
  520.   enum { ROLE_OUTLINE = 64U };     // ATK_ROLE_TREE
  521.   // The object represents an item in an outline or tree structure
  522.   enum { ROLE_OUTLINEITEM = 31U }; // ATK_ROLE_LIST_ITEM
  523.   enum { ROLE_PAGETAB = 36U };     // ATK_ROLE_PAGE_TAB
  524.   enum { ROLE_PROPERTYPAGE = 66U };// ATK_ROLE_UNKNOWN
  525.   enum { ROLE_INDICATOR = 66U };   // ATK_ROLE_UNKNOWN
  526.   enum { ROLE_GRAPHIC = 26U };     // ATK_ROLE_IMAGE
  527.   // Read-only text, can't be modified or selected
  528.   enum { ROLE_STATICTEXT = 60U };  // ATK_ROLE_TEXT
  529.   enum { ROLE_TEXT = 60U };        // ATK_ROLE_TEXT
  530.   enum { ROLE_PUSHBUTTON = 42U };  // ATK_ROLE_PUSH_BUTTON
  531.   enum { ROLE_CHECKBUTTON = 7U };  // ATK_ROLE_CHECK_BOX
  532.   enum { ROLE_RADIOBUTTON = 43U }; // ATK_ROLE_RADIO_BUTTON
  533.   enum { ROLE_COMBOBOX = 11U };    // ATK_ROLE_COMBO_BOX
  534.   // Just represents the calender control
  535.   enum { ROLE_DROPLIST = 5U };     // ATK_ROLE_CALENDAR
  536.   enum { ROLE_PROGRESSBAR = 41U }; // ATK_ROLE_PROGRESS_BAR
  537.   enum { ROLE_DIAL = 15U };        // ATK_ROLE_DIAL
  538.   enum { ROLE_HOTKEYFIELD = 66U }; // ATK_ROLE_UNKNOWN
  539.   enum { ROLE_SLIDER = 50U };      // ATK_ROLE_SLIDER
  540.   enum { ROLE_SPINBUTTON = 52U };  // ATK_ROLE_SPIN_BUTTON
  541.   enum { ROLE_DIAGRAM = 26U };     // ATK_ROLE_IMAGE
  542.   enum { ROLE_ANIMATION = 3U };    // ATK_ROLE_ANIMATION
  543.   enum { ROLE_EQUATION = 66U };    // ATK_ROLE_UNKNOWN
  544.   enum { ROLE_BUTTONDROPDOWN = 42U }; // ATK_ROLE_PUSH_BUTTON
  545.   enum { ROLE_BUTTONMENU = 42U };  // ATK_ROLE_PUSH_BUTTON
  546.   // Represents a button that drops down a grid
  547.   enum { ROLE_BUTTONDROPDOWNGRID = 66U }; // ATK_ROLE_UNKNOWN
  548.   enum { ROLE_WHITESPACE = 66U };  // ATK_ROLE_UNKNOWN
  549.   enum { ROLE_PAGETABLIST = 37U }; // ATK_ROLE_PAGE_TAB_LIST
  550.   enum { ROLE_CLOCK = 66U };       // ATK_ROLE_UNKNOWN
  551.   // Represents a button on the toolbar that has a drop-down list icon
  552.   // directly adjacent to the button
  553.   enum { ROLE_SPLITBUTTON = 42U }; // ATK_ROLE_PUSH_BUTTON
  554.   enum { ROLE_IPADDRESS = 66U };   // ATK_ROLE_UNKNOWN
  555.   enum { ROLE_NOTHING = 66U };     // ATK_ROLE_UNKNOWN
  556.   // Represent top level window
  557.   enum { ROLE_FRAME = 22U };               // ATK_ROLE_FRAME
  558.   // Other roles from atk.h
  559.   enum { ROLE_ACCEL_LABEL = 1U };          // ATK_ROLE_ACCEL_LABEL
  560.   enum { ROLE_ARROW  = 4U };               // ATK_ROLE_ARROW
  561.   enum { ROLE_CANVAS = 6U };               // ATK_ROLE_CANVAS
  562.   enum { ROLE_CHECK_MENU_ITEM = 8U };      // ATK_ROLE_CHECK_MENU_ITEM
  563.   enum { ROLE_COLOR_CHOOSER  = 9U };       // ATK_ROLE_COLOR_CHOOSER
  564.   enum { ROLE_DATE_EDITOR = 12U };         // ATK_ROLE_DATE_EDITOR
  565.   enum { ROLE_DESKTOP_ICON = 13U };        // ATK_ROLE_DESKTOP_ICON
  566.   enum { ROLE_DESKTOP_FRAME = 14U };       // ATK_ROLE_DESKTOP_FRAME
  567.   enum { ROLE_DIRECTORY_PANE = 17U };      // ATK_ROLE_DIRECTORY_PANE
  568.   enum { ROLE_FILE_CHOOSER = 19U};         // ATK_ROLE_FILE_CHOOSER
  569.   enum { ROLE_FILLER = 20U };              // ATK_ROLE_FILLER
  570.   enum { ROLE_FONT_CHOOSER = 21U };        // ATK_ROLE_FONT_CHOOSER
  571.   enum { ROLE_GLASS_PANE = 23U };          // ATK_ROLE_GLASS_PANE
  572.   enum { ROLE_HTML_CONTAINER = 24U };      // ATK_ROLE_HTML_CONTAINER
  573.   enum { ROLE_ICON = 25U };                // ATK_ROLE_ICON
  574.   enum { ROLE_INTERNAL_FRAME = 27U };      // ATK_ROLE_INTERNAL_FRAME
  575.   enum { ROLE_LABEL = 28U };               // ATK_ROLE_LABEL
  576.   enum { ROLE_LAYERED_PANE = 29U };        // ATK_ROLE_LAYERED_PANE
  577.   enum { ROLE_OPTION_PANE = 35U };         // ATK_ROLE_OPTION_PANE
  578.   enum { ROLE_PASSWORD_TEXT = 39U };       // ATK_ROLE_PASSWORD_TEXT
  579.   enum { ROLE_POPUP_MENU = 40U };          // ATK_ROLE_POPUP_MENU
  580.   enum { ROLE_RADIO_MENU_ITEM = 44U };     // ATK_ROLE_RADIO_MENU_ITEM
  581.   enum { ROLE_ROOT_PANE = 45U };           // ATK_ROLE_ROOT_PANE
  582.   enum { ROLE_SCROLL_PANE = 48U };         // ATK_ROLE_SCROLL_PANE
  583.   enum { ROLE_SPLIT_PANE = 51U };          // ATK_ROLE_SPLIT_PANE
  584.   enum { ROLE_TABLE_COLUMN_HEADER = 56U }; // ATK_ROLE_TABLE_COLUMN_HEADER
  585.   enum { ROLE_TABLE_ROW_HEADER = 57U };    // ATK_ROLE_TABLE_ROW_HEADER
  586.   enum { ROLE_TEAR_OFF_MENU_ITEM = 58U };  // ATK_ROLE_TEAR_OFF_MENU_ITEM
  587.   enum { ROLE_TERMINAL = 59U };            // ATK_ROLE_TERMINAL
  588.   enum { ROLE_TOGGLE_BUTTON = 61U };       // ATK_ROLE_TOGGLE_BUTTON
  589.   enum { ROLE_TREE_TABLE = 65U };          // ATK_ROLE_TREE_TABLE
  590.   enum { ROLE_VIEWPORT = 67U };            // ATK_ROLE_VIEWPORT
  591.   enum { ROLE_HEADER = 69U };              // ATK_ROLE_HEADER
  592.   enum { ROLE_FOOTER = 70U };              // ATK_ROLE_FOOTER
  593.   enum { ROLE_PARAGRAPH = 71U };           // ATK_ROLE_PARAGRAPH
  594.   enum { ROLE_RULER = 72U };               // ATK_ROLE_RULER
  595.   enum { ROLE_AUTOCOMPLETE = 74U };        // ATK_ROLE_AUTOCOMPLETE
  596. #else
  597. // MSAA Roles - only one per nsIAccessible or IAccessible
  598.   enum { ROLE_TITLEBAR = 1U };
  599.   enum { ROLE_MENUBAR = 2U };
  600.   enum { ROLE_SCROLLBAR = 3U };
  601.   enum { ROLE_GRIP = 4U };
  602.   enum { ROLE_SOUND = 5U };
  603.   enum { ROLE_CURSOR = 6U };
  604.   enum { ROLE_CARET = 7U };
  605.   enum { ROLE_ALERT = 8U };
  606.   enum { ROLE_WINDOW = 9U };
  607.   enum { ROLE_CLIENT = 10U };
  608.   enum { ROLE_MENUPOPUP = 11U };
  609.   enum { ROLE_MENUITEM = 12U };
  610.   enum { ROLE_RADIO_MENU_ITEM = 12U }; // Same as ROLE_MENUITEM
  611.   enum { ROLE_CHECK_MENU_ITEM = 12U }; // Same as ROLE_MENUITEM
  612.   enum { ROLE_TOOLTIP = 13U };
  613.   enum { ROLE_APPLICATION = 14U };
  614.   enum { ROLE_DOCUMENT = 15U };
  615.   enum { ROLE_PANE = 16U };
  616.   enum { ROLE_CHART = 17U };
  617.   enum { ROLE_DIALOG = 18U };
  618.   enum { ROLE_BORDER = 19U };
  619.   enum { ROLE_GROUPING = 20U };
  620.   enum { ROLE_SEPARATOR = 21U };
  621.   enum { ROLE_TOOLBAR = 22U };
  622.   enum { ROLE_STATUSBAR = 23U };
  623.   enum { ROLE_TABLE = 24U };
  624.   enum { ROLE_COLUMNHEADER = 25U };
  625.   enum { ROLE_ROWHEADER = 26U };
  626.   enum { ROLE_COLUMN = 27U };
  627.   enum { ROLE_ROW = 28U };
  628.   enum { ROLE_CELL = 29U };
  629.   enum { ROLE_LINK = 30U };
  630.   enum { ROLE_HELPBALLOON = 31U };
  631.   enum { ROLE_CHARACTER = 32U };
  632.   enum { ROLE_LIST = 33U };
  633.   enum { ROLE_LISTITEM = 34U };
  634.   enum { ROLE_OUTLINE = 35U };
  635.   enum { ROLE_TREE_TABLE = 35U }; // Same as ROLE_OUTLINE
  636.   enum { ROLE_OUTLINEITEM = 36U };
  637.   enum { ROLE_PAGETAB = 37U };
  638.   enum { ROLE_PROPERTYPAGE = 38U };
  639.   enum { ROLE_INDICATOR = 39U };
  640.   enum { ROLE_GRAPHIC = 40U };
  641.   enum { ROLE_STATICTEXT = 41U };
  642.   enum { ROLE_TEXT = 42U };
  643.   enum { ROLE_PUSHBUTTON = 43U };
  644.   enum { ROLE_CHECKBUTTON = 44U };
  645.   enum { ROLE_RADIOBUTTON = 45U };
  646.   enum { ROLE_COMBOBOX = 46U };
  647.   enum { ROLE_DROPLIST = 47U };
  648.   enum { ROLE_PROGRESSBAR = 48U };
  649.   enum { ROLE_DIAL = 49U };
  650.   enum { ROLE_HOTKEYFIELD = 50U };
  651.   enum { ROLE_SLIDER = 51U };
  652.   enum { ROLE_SPINBUTTON = 52U };
  653.   enum { ROLE_DIAGRAM = 53U };
  654.   enum { ROLE_ANIMATION = 54U };
  655.   enum { ROLE_EQUATION = 55U };
  656.   enum { ROLE_BUTTONDROPDOWN = 56U };
  657.   enum { ROLE_BUTTONMENU = 57U };
  658.   enum { ROLE_BUTTONDROPDOWNGRID = 58U };
  659.   enum { ROLE_WHITESPACE = 59U };
  660.   enum { ROLE_PAGETABLIST = 60U };
  661.   enum { ROLE_CLOCK = 61U };
  662.   enum { ROLE_SPLITBUTTON = 62U };
  663.   enum { ROLE_IPADDRESS = 63U };
  664.   enum { ROLE_NOTHING = 4294967295U };
  665. // Make up for ATK roles that we don't have in MSAA
  666. // When in doubt map them to ROLE_NOTHING so that the role string is exposed
  667.   enum { ROLE_ICON = ROLE_NOTHING };
  668.   enum { ROLE_PASSWORD_TEXT = ROLE_TEXT };
  669. // MSAA relationship extensions to accNavigate
  670.   enum { NAVRELATION_CONTROLLED_BY = 0x1000 };
  671.   enum { NAVRELATION_CONTROLLER_FOR = 0x1001 };
  672.   enum { NAVRELATION_LABEL_FOR = 0x1002 };
  673.   enum { NAVRELATION_LABELLED_BY = 0x1003 };
  674.   enum { NAVRELATION_MEMBER_OF = 0x1004 };
  675.   enum { NAVRELATION_NODE_CHILD_OF = 0x1005 };
  676.   enum { NAVRELATION_FLOWS_TO = 0x1006 };
  677.   enum { NAVRELATION_FLOWS_FROM = 0x1007 };
  678.   enum { NAVRELATION_SUBWINDOW_OF = 0x1008 };
  679.   enum { NAVRELATION_EMBEDS = 0x1009 };
  680.   enum { NAVRELATION_EMBEDDED_BY = 0x100a };
  681.   enum { NAVRELATION_POPUP_FOR = 0x100b };
  682.   enum { NAVRELATION_PARENT_WINDOW_OF = 0x100c };
  683.   enum { NAVRELATION_DEFAULT_BUTTON = 0x100d };
  684.   enum { NAVRELATION_DESCRIBED_BY = 0x100e };
  685.   enum { NAVRELATION_DESCRIPTION_FOR = 0x100f };
  686. #endif
  687. };
  688.  
  689. /* Use this macro when declaring classes that implement this interface. */
  690. #define NS_DECL_NSIACCESSIBLE \
  691.   NS_IMETHOD GetParent(nsIAccessible * *aParent); \
  692.   NS_IMETHOD GetNextSibling(nsIAccessible * *aNextSibling); \
  693.   NS_IMETHOD GetPreviousSibling(nsIAccessible * *aPreviousSibling); \
  694.   NS_IMETHOD GetFirstChild(nsIAccessible * *aFirstChild); \
  695.   NS_IMETHOD GetLastChild(nsIAccessible * *aLastChild); \
  696.   NS_IMETHOD GetChildCount(PRInt32 *aChildCount); \
  697.   NS_IMETHOD GetIndexInParent(PRInt32 *aIndexInParent); \
  698.   NS_IMETHOD GetName(nsAString & aName); \
  699.   NS_IMETHOD SetName(const nsAString & aName); \
  700.   NS_IMETHOD GetFinalValue(nsAString & aFinalValue); \
  701.   NS_IMETHOD GetDescription(nsAString & aDescription); \
  702.   NS_IMETHOD GetKeyboardShortcut(nsAString & aKeyboardShortcut); \
  703.   NS_IMETHOD GetKeyBinding(nsAString & aKeyBinding); \
  704.   NS_IMETHOD GetRole(PRUint32 *aRole); \
  705.   NS_IMETHOD GetFinalRole(PRUint32 *aFinalRole); \
  706.   NS_IMETHOD GetFinalState(PRUint32 *aFinalState); \
  707.   NS_IMETHOD GetExtState(PRUint32 *aExtState); \
  708.   NS_IMETHOD GetHelp(nsAString & aHelp); \
  709.   NS_IMETHOD GetFocusedChild(nsIAccessible * *aFocusedChild); \
  710.   NS_IMETHOD GetChildAtPoint(PRInt32 x, PRInt32 y, nsIAccessible **_retval); \
  711.   NS_IMETHOD GetChildAt(PRInt32 aChildIndex, nsIAccessible **_retval); \
  712.   NS_IMETHOD GetAccessibleToRight(nsIAccessible **_retval); \
  713.   NS_IMETHOD GetAccessibleToLeft(nsIAccessible **_retval); \
  714.   NS_IMETHOD GetAccessibleAbove(nsIAccessible **_retval); \
  715.   NS_IMETHOD GetAccessibleBelow(nsIAccessible **_retval); \
  716.   NS_IMETHOD GetAccessibleRelated(PRUint32 aRelationType, nsIAccessible **_retval); \
  717.   NS_IMETHOD GetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height); \
  718.   NS_IMETHOD AddSelection(void); \
  719.   NS_IMETHOD RemoveSelection(void); \
  720.   NS_IMETHOD ExtendSelection(void); \
  721.   NS_IMETHOD TakeSelection(void); \
  722.   NS_IMETHOD TakeFocus(void); \
  723.   NS_IMETHOD GetNumActions(PRUint8 *aNumActions); \
  724.   NS_IMETHOD GetActionName(PRUint8 index, nsAString & _retval); \
  725.   NS_IMETHOD DoAction(PRUint8 index); \
  726.   NS_IMETHOD GetNativeInterface(void * *aOutAccessible); \
  727.  
  728. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  729. #define NS_FORWARD_NSIACCESSIBLE(_to) \
  730.   NS_IMETHOD GetParent(nsIAccessible * *aParent) { return _to GetParent(aParent); } \
  731.   NS_IMETHOD GetNextSibling(nsIAccessible * *aNextSibling) { return _to GetNextSibling(aNextSibling); } \
  732.   NS_IMETHOD GetPreviousSibling(nsIAccessible * *aPreviousSibling) { return _to GetPreviousSibling(aPreviousSibling); } \
  733.   NS_IMETHOD GetFirstChild(nsIAccessible * *aFirstChild) { return _to GetFirstChild(aFirstChild); } \
  734.   NS_IMETHOD GetLastChild(nsIAccessible * *aLastChild) { return _to GetLastChild(aLastChild); } \
  735.   NS_IMETHOD GetChildCount(PRInt32 *aChildCount) { return _to GetChildCount(aChildCount); } \
  736.   NS_IMETHOD GetIndexInParent(PRInt32 *aIndexInParent) { return _to GetIndexInParent(aIndexInParent); } \
  737.   NS_IMETHOD GetName(nsAString & aName) { return _to GetName(aName); } \
  738.   NS_IMETHOD SetName(const nsAString & aName) { return _to SetName(aName); } \
  739.   NS_IMETHOD GetFinalValue(nsAString & aFinalValue) { return _to GetFinalValue(aFinalValue); } \
  740.   NS_IMETHOD GetDescription(nsAString & aDescription) { return _to GetDescription(aDescription); } \
  741.   NS_IMETHOD GetKeyboardShortcut(nsAString & aKeyboardShortcut) { return _to GetKeyboardShortcut(aKeyboardShortcut); } \
  742.   NS_IMETHOD GetKeyBinding(nsAString & aKeyBinding) { return _to GetKeyBinding(aKeyBinding); } \
  743.   NS_IMETHOD GetRole(PRUint32 *aRole) { return _to GetRole(aRole); } \
  744.   NS_IMETHOD GetFinalRole(PRUint32 *aFinalRole) { return _to GetFinalRole(aFinalRole); } \
  745.   NS_IMETHOD GetFinalState(PRUint32 *aFinalState) { return _to GetFinalState(aFinalState); } \
  746.   NS_IMETHOD GetExtState(PRUint32 *aExtState) { return _to GetExtState(aExtState); } \
  747.   NS_IMETHOD GetHelp(nsAString & aHelp) { return _to GetHelp(aHelp); } \
  748.   NS_IMETHOD GetFocusedChild(nsIAccessible * *aFocusedChild) { return _to GetFocusedChild(aFocusedChild); } \
  749.   NS_IMETHOD GetChildAtPoint(PRInt32 x, PRInt32 y, nsIAccessible **_retval) { return _to GetChildAtPoint(x, y, _retval); } \
  750.   NS_IMETHOD GetChildAt(PRInt32 aChildIndex, nsIAccessible **_retval) { return _to GetChildAt(aChildIndex, _retval); } \
  751.   NS_IMETHOD GetAccessibleToRight(nsIAccessible **_retval) { return _to GetAccessibleToRight(_retval); } \
  752.   NS_IMETHOD GetAccessibleToLeft(nsIAccessible **_retval) { return _to GetAccessibleToLeft(_retval); } \
  753.   NS_IMETHOD GetAccessibleAbove(nsIAccessible **_retval) { return _to GetAccessibleAbove(_retval); } \
  754.   NS_IMETHOD GetAccessibleBelow(nsIAccessible **_retval) { return _to GetAccessibleBelow(_retval); } \
  755.   NS_IMETHOD GetAccessibleRelated(PRUint32 aRelationType, nsIAccessible **_retval) { return _to GetAccessibleRelated(aRelationType, _retval); } \
  756.   NS_IMETHOD GetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height) { return _to GetBounds(x, y, width, height); } \
  757.   NS_IMETHOD AddSelection(void) { return _to AddSelection(); } \
  758.   NS_IMETHOD RemoveSelection(void) { return _to RemoveSelection(); } \
  759.   NS_IMETHOD ExtendSelection(void) { return _to ExtendSelection(); } \
  760.   NS_IMETHOD TakeSelection(void) { return _to TakeSelection(); } \
  761.   NS_IMETHOD TakeFocus(void) { return _to TakeFocus(); } \
  762.   NS_IMETHOD GetNumActions(PRUint8 *aNumActions) { return _to GetNumActions(aNumActions); } \
  763.   NS_IMETHOD GetActionName(PRUint8 index, nsAString & _retval) { return _to GetActionName(index, _retval); } \
  764.   NS_IMETHOD DoAction(PRUint8 index) { return _to DoAction(index); } \
  765.   NS_IMETHOD GetNativeInterface(void * *aOutAccessible) { return _to GetNativeInterface(aOutAccessible); } \
  766.  
  767. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  768. #define NS_FORWARD_SAFE_NSIACCESSIBLE(_to) \
  769.   NS_IMETHOD GetParent(nsIAccessible * *aParent) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetParent(aParent); } \
  770.   NS_IMETHOD GetNextSibling(nsIAccessible * *aNextSibling) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNextSibling(aNextSibling); } \
  771.   NS_IMETHOD GetPreviousSibling(nsIAccessible * *aPreviousSibling) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPreviousSibling(aPreviousSibling); } \
  772.   NS_IMETHOD GetFirstChild(nsIAccessible * *aFirstChild) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFirstChild(aFirstChild); } \
  773.   NS_IMETHOD GetLastChild(nsIAccessible * *aLastChild) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLastChild(aLastChild); } \
  774.   NS_IMETHOD GetChildCount(PRInt32 *aChildCount) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetChildCount(aChildCount); } \
  775.   NS_IMETHOD GetIndexInParent(PRInt32 *aIndexInParent) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIndexInParent(aIndexInParent); } \
  776.   NS_IMETHOD GetName(nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \
  777.   NS_IMETHOD SetName(const nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetName(aName); } \
  778.   NS_IMETHOD GetFinalValue(nsAString & aFinalValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFinalValue(aFinalValue); } \
  779.   NS_IMETHOD GetDescription(nsAString & aDescription) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDescription(aDescription); } \
  780.   NS_IMETHOD GetKeyboardShortcut(nsAString & aKeyboardShortcut) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetKeyboardShortcut(aKeyboardShortcut); } \
  781.   NS_IMETHOD GetKeyBinding(nsAString & aKeyBinding) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetKeyBinding(aKeyBinding); } \
  782.   NS_IMETHOD GetRole(PRUint32 *aRole) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRole(aRole); } \
  783.   NS_IMETHOD GetFinalRole(PRUint32 *aFinalRole) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFinalRole(aFinalRole); } \
  784.   NS_IMETHOD GetFinalState(PRUint32 *aFinalState) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFinalState(aFinalState); } \
  785.   NS_IMETHOD GetExtState(PRUint32 *aExtState) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetExtState(aExtState); } \
  786.   NS_IMETHOD GetHelp(nsAString & aHelp) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHelp(aHelp); } \
  787.   NS_IMETHOD GetFocusedChild(nsIAccessible * *aFocusedChild) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFocusedChild(aFocusedChild); } \
  788.   NS_IMETHOD GetChildAtPoint(PRInt32 x, PRInt32 y, nsIAccessible **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetChildAtPoint(x, y, _retval); } \
  789.   NS_IMETHOD GetChildAt(PRInt32 aChildIndex, nsIAccessible **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetChildAt(aChildIndex, _retval); } \
  790.   NS_IMETHOD GetAccessibleToRight(nsIAccessible **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAccessibleToRight(_retval); } \
  791.   NS_IMETHOD GetAccessibleToLeft(nsIAccessible **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAccessibleToLeft(_retval); } \
  792.   NS_IMETHOD GetAccessibleAbove(nsIAccessible **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAccessibleAbove(_retval); } \
  793.   NS_IMETHOD GetAccessibleBelow(nsIAccessible **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAccessibleBelow(_retval); } \
  794.   NS_IMETHOD GetAccessibleRelated(PRUint32 aRelationType, nsIAccessible **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAccessibleRelated(aRelationType, _retval); } \
  795.   NS_IMETHOD GetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBounds(x, y, width, height); } \
  796.   NS_IMETHOD AddSelection(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddSelection(); } \
  797.   NS_IMETHOD RemoveSelection(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveSelection(); } \
  798.   NS_IMETHOD ExtendSelection(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->ExtendSelection(); } \
  799.   NS_IMETHOD TakeSelection(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->TakeSelection(); } \
  800.   NS_IMETHOD TakeFocus(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->TakeFocus(); } \
  801.   NS_IMETHOD GetNumActions(PRUint8 *aNumActions) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNumActions(aNumActions); } \
  802.   NS_IMETHOD GetActionName(PRUint8 index, nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetActionName(index, _retval); } \
  803.   NS_IMETHOD DoAction(PRUint8 index) { return !_to ? NS_ERROR_NULL_POINTER : _to->DoAction(index); } \
  804.   NS_IMETHOD GetNativeInterface(void * *aOutAccessible) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNativeInterface(aOutAccessible); } \
  805.  
  806. #if 0
  807. /* Use the code below as a template for the implementation class for this interface. */
  808.  
  809. /* Header file */
  810. class nsAccessible : public nsIAccessible
  811. {
  812. public:
  813.   NS_DECL_ISUPPORTS
  814.   NS_DECL_NSIACCESSIBLE
  815.  
  816.   nsAccessible();
  817.  
  818. private:
  819.   ~nsAccessible();
  820.  
  821. protected:
  822.   /* additional members */
  823. };
  824.  
  825. /* Implementation file */
  826. NS_IMPL_ISUPPORTS1(nsAccessible, nsIAccessible)
  827.  
  828. nsAccessible::nsAccessible()
  829. {
  830.   /* member initializers and constructor code */
  831. }
  832.  
  833. nsAccessible::~nsAccessible()
  834. {
  835.   /* destructor code */
  836. }
  837.  
  838. /* readonly attribute nsIAccessible parent; */
  839. NS_IMETHODIMP nsAccessible::GetParent(nsIAccessible * *aParent)
  840. {
  841.     return NS_ERROR_NOT_IMPLEMENTED;
  842. }
  843.  
  844. /* readonly attribute nsIAccessible nextSibling; */
  845. NS_IMETHODIMP nsAccessible::GetNextSibling(nsIAccessible * *aNextSibling)
  846. {
  847.     return NS_ERROR_NOT_IMPLEMENTED;
  848. }
  849.  
  850. /* readonly attribute nsIAccessible previousSibling; */
  851. NS_IMETHODIMP nsAccessible::GetPreviousSibling(nsIAccessible * *aPreviousSibling)
  852. {
  853.     return NS_ERROR_NOT_IMPLEMENTED;
  854. }
  855.  
  856. /* readonly attribute nsIAccessible firstChild; */
  857. NS_IMETHODIMP nsAccessible::GetFirstChild(nsIAccessible * *aFirstChild)
  858. {
  859.     return NS_ERROR_NOT_IMPLEMENTED;
  860. }
  861.  
  862. /* readonly attribute nsIAccessible lastChild; */
  863. NS_IMETHODIMP nsAccessible::GetLastChild(nsIAccessible * *aLastChild)
  864. {
  865.     return NS_ERROR_NOT_IMPLEMENTED;
  866. }
  867.  
  868. /* readonly attribute long childCount; */
  869. NS_IMETHODIMP nsAccessible::GetChildCount(PRInt32 *aChildCount)
  870. {
  871.     return NS_ERROR_NOT_IMPLEMENTED;
  872. }
  873.  
  874. /* readonly attribute long indexInParent; */
  875. NS_IMETHODIMP nsAccessible::GetIndexInParent(PRInt32 *aIndexInParent)
  876. {
  877.     return NS_ERROR_NOT_IMPLEMENTED;
  878. }
  879.  
  880. /* attribute AString name; */
  881. NS_IMETHODIMP nsAccessible::GetName(nsAString & aName)
  882. {
  883.     return NS_ERROR_NOT_IMPLEMENTED;
  884. }
  885. NS_IMETHODIMP nsAccessible::SetName(const nsAString & aName)
  886. {
  887.     return NS_ERROR_NOT_IMPLEMENTED;
  888. }
  889.  
  890. /* readonly attribute AString finalValue; */
  891. NS_IMETHODIMP nsAccessible::GetFinalValue(nsAString & aFinalValue)
  892. {
  893.     return NS_ERROR_NOT_IMPLEMENTED;
  894. }
  895.  
  896. /* readonly attribute AString description; */
  897. NS_IMETHODIMP nsAccessible::GetDescription(nsAString & aDescription)
  898. {
  899.     return NS_ERROR_NOT_IMPLEMENTED;
  900. }
  901.  
  902. /* readonly attribute AString keyboardShortcut; */
  903. NS_IMETHODIMP nsAccessible::GetKeyboardShortcut(nsAString & aKeyboardShortcut)
  904. {
  905.     return NS_ERROR_NOT_IMPLEMENTED;
  906. }
  907.  
  908. /* readonly attribute AString keyBinding; */
  909. NS_IMETHODIMP nsAccessible::GetKeyBinding(nsAString & aKeyBinding)
  910. {
  911.     return NS_ERROR_NOT_IMPLEMENTED;
  912. }
  913.  
  914. /* readonly attribute unsigned long role; */
  915. NS_IMETHODIMP nsAccessible::GetRole(PRUint32 *aRole)
  916. {
  917.     return NS_ERROR_NOT_IMPLEMENTED;
  918. }
  919.  
  920. /* readonly attribute unsigned long finalRole; */
  921. NS_IMETHODIMP nsAccessible::GetFinalRole(PRUint32 *aFinalRole)
  922. {
  923.     return NS_ERROR_NOT_IMPLEMENTED;
  924. }
  925.  
  926. /* readonly attribute unsigned long finalState; */
  927. NS_IMETHODIMP nsAccessible::GetFinalState(PRUint32 *aFinalState)
  928. {
  929.     return NS_ERROR_NOT_IMPLEMENTED;
  930. }
  931.  
  932. /* readonly attribute unsigned long extState; */
  933. NS_IMETHODIMP nsAccessible::GetExtState(PRUint32 *aExtState)
  934. {
  935.     return NS_ERROR_NOT_IMPLEMENTED;
  936. }
  937.  
  938. /* readonly attribute AString help; */
  939. NS_IMETHODIMP nsAccessible::GetHelp(nsAString & aHelp)
  940. {
  941.     return NS_ERROR_NOT_IMPLEMENTED;
  942. }
  943.  
  944. /* readonly attribute nsIAccessible focusedChild; */
  945. NS_IMETHODIMP nsAccessible::GetFocusedChild(nsIAccessible * *aFocusedChild)
  946. {
  947.     return NS_ERROR_NOT_IMPLEMENTED;
  948. }
  949.  
  950. /* nsIAccessible getChildAtPoint (in long x, in long y); */
  951. NS_IMETHODIMP nsAccessible::GetChildAtPoint(PRInt32 x, PRInt32 y, nsIAccessible **_retval)
  952. {
  953.     return NS_ERROR_NOT_IMPLEMENTED;
  954. }
  955.  
  956. /* nsIAccessible getChildAt (in long aChildIndex); */
  957. NS_IMETHODIMP nsAccessible::GetChildAt(PRInt32 aChildIndex, nsIAccessible **_retval)
  958. {
  959.     return NS_ERROR_NOT_IMPLEMENTED;
  960. }
  961.  
  962. /* nsIAccessible getAccessibleToRight (); */
  963. NS_IMETHODIMP nsAccessible::GetAccessibleToRight(nsIAccessible **_retval)
  964. {
  965.     return NS_ERROR_NOT_IMPLEMENTED;
  966. }
  967.  
  968. /* nsIAccessible getAccessibleToLeft (); */
  969. NS_IMETHODIMP nsAccessible::GetAccessibleToLeft(nsIAccessible **_retval)
  970. {
  971.     return NS_ERROR_NOT_IMPLEMENTED;
  972. }
  973.  
  974. /* nsIAccessible getAccessibleAbove (); */
  975. NS_IMETHODIMP nsAccessible::GetAccessibleAbove(nsIAccessible **_retval)
  976. {
  977.     return NS_ERROR_NOT_IMPLEMENTED;
  978. }
  979.  
  980. /* nsIAccessible getAccessibleBelow (); */
  981. NS_IMETHODIMP nsAccessible::GetAccessibleBelow(nsIAccessible **_retval)
  982. {
  983.     return NS_ERROR_NOT_IMPLEMENTED;
  984. }
  985.  
  986. /* nsIAccessible getAccessibleRelated (in unsigned long aRelationType); */
  987. NS_IMETHODIMP nsAccessible::GetAccessibleRelated(PRUint32 aRelationType, nsIAccessible **_retval)
  988. {
  989.     return NS_ERROR_NOT_IMPLEMENTED;
  990. }
  991.  
  992. /* void getBounds (out long x, out long y, out long width, out long height); */
  993. NS_IMETHODIMP nsAccessible::GetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height)
  994. {
  995.     return NS_ERROR_NOT_IMPLEMENTED;
  996. }
  997.  
  998. /* void addSelection (); */
  999. NS_IMETHODIMP nsAccessible::AddSelection()
  1000. {
  1001.     return NS_ERROR_NOT_IMPLEMENTED;
  1002. }
  1003.  
  1004. /* void removeSelection (); */
  1005. NS_IMETHODIMP nsAccessible::RemoveSelection()
  1006. {
  1007.     return NS_ERROR_NOT_IMPLEMENTED;
  1008. }
  1009.  
  1010. /* void extendSelection (); */
  1011. NS_IMETHODIMP nsAccessible::ExtendSelection()
  1012. {
  1013.     return NS_ERROR_NOT_IMPLEMENTED;
  1014. }
  1015.  
  1016. /* void takeSelection (); */
  1017. NS_IMETHODIMP nsAccessible::TakeSelection()
  1018. {
  1019.     return NS_ERROR_NOT_IMPLEMENTED;
  1020. }
  1021.  
  1022. /* void takeFocus (); */
  1023. NS_IMETHODIMP nsAccessible::TakeFocus()
  1024. {
  1025.     return NS_ERROR_NOT_IMPLEMENTED;
  1026. }
  1027.  
  1028. /* readonly attribute PRUint8 numActions; */
  1029. NS_IMETHODIMP nsAccessible::GetNumActions(PRUint8 *aNumActions)
  1030. {
  1031.     return NS_ERROR_NOT_IMPLEMENTED;
  1032. }
  1033.  
  1034. /* AString getActionName (in PRUint8 index); */
  1035. NS_IMETHODIMP nsAccessible::GetActionName(PRUint8 index, nsAString & _retval)
  1036. {
  1037.     return NS_ERROR_NOT_IMPLEMENTED;
  1038. }
  1039.  
  1040. /* void doAction (in PRUint8 index); */
  1041. NS_IMETHODIMP nsAccessible::DoAction(PRUint8 index)
  1042. {
  1043.     return NS_ERROR_NOT_IMPLEMENTED;
  1044. }
  1045.  
  1046. /* [noscript] void getNativeInterface (out voidPtr aOutAccessible); */
  1047. NS_IMETHODIMP nsAccessible::GetNativeInterface(void * *aOutAccessible)
  1048. {
  1049.     return NS_ERROR_NOT_IMPLEMENTED;
  1050. }
  1051.  
  1052. /* End of implementation class template. */
  1053. #endif
  1054.  
  1055.  
  1056. #endif /* __gen_nsIAccessible_h__ */
  1057.